import router from '@/router'
import { useAppStore } from '@/store'

export const genOriginalRoute = (item: any) => {
	const appStore = useAppStore()
	const hasRoute = router.hasRoute(item?.thirdPartyGameId)
	if (hasRoute) {
		// return `/${appStore.lang}/casino/games/2up-originals/${item?.thirdPartyGameId}`
		return { name: item?.thirdPartyGameId, params: { /*id: item?.slug,*/ locale: appStore.lang } }
	} else {
		console.warn(`后台配置了原创游戏: ${item?.thirdPartyGameId}; 但前端未开发!`)
		return '/todo'
	}
}
